Function at 0x41f1f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47adb1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8bc
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x2c]
mov edx, dword [esi + 0x28]
push eax
push ecx
push edx
push str.recreateBuffer__dx_dx_d_
xor edi, edi
push 0x4a72b0
mov dword [esp + 0x24], edi
call fcn.00402ee0
mov ebx, dword [esi + 0x28]
add esp, 0x14
cmp ebx, edi
je 0x41f469
mov ebp, dword [esi + 0x2c]
test ebp, ebp
je 0x41f469
mov eax, dword [esi + 8]
test eax, eax
je 0x41f469
xor eax, eax
mov ecx, 0x10a
lea edi, [esp + 0x198]
rep stosd dword es:[edi], eax
mov cl, byte [esi + 0xd]
test cl, cl
mov cx, word [esi + 4]
sete al
mov word [esp + 0x1a6], cx
mov ecx, dword [esi + 4]
mov dword [esp + 0x19c], ebx
mov dword [esp + 0x198], 0x28
mov word [esp + 0x1a4], 1
mov edi, eax
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, ebx
imul eax, ebp
xor edx, edx
neg ebp
mov ebx, 8
cmp ecx, ebx
mov ecx, dword [esi + 0x1c]
setle dl
mov dword [esp + 0x1ac], eax
mov eax, dword [esi + 0x10]
shl eax, cl
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x1a0], ebp
dec edx
and edx, 3
mov dword [esp + 0x1a8], edx
mov edx, dword [esi + 0x14]
mov dword [esp + 0x1c0], eax
mov eax, dword [esi + 0x18]
shl edx, cl
mov ecx, dword [esi + 0x24]
shl eax, cl
mov dword [esp + 0x1c4], edx
mov dword [esp + 0x1c8], eax
mov eax, dword [esi + 0xc48]
test eax, eax
je 0x41f32d
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push edi
lea edx, [esp + 0x1a8]
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, eax
jmp 0x41f364
mov eax, dword [esi + 0xc44]
push eax
lea ecx, [esp + 0x30]
call fcn.0041c5c0
mov eax, dword [eax + 4]
push 0
push 0
lea ecx, [esp + 0x18]
push ecx
push edi
lea edx, [esp + 0x1a8]
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
lea ecx, [esp + 0x2c]
mov edi, eax
call fcn.0041c660
test edi, edi
jne 0x41f3a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_create_DIB_section
lea ecx, [esp + 0x6cc]
call fcn.0044ba90
mov esi, eax
push 0x49859c
lea eax, [esp + 0x98]
mov ecx, 0x41
lea edi, [esp + 0x98]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
push str.recreated
push 0x4a72b0
call fcn.00402ee0
mov eax, dword [esi + 0x3c]
add esp, 8
test eax, eax
je 0x41f52e
push str.preserving_bitmap_contents
push 0x4a72b0
call fcn.00402ee0
mov eax, dword [esi + 0xc48]
add esp, 8
test eax, eax
je 0x41f480
cmp dword [esi + 4], ebx
jg 0x41f3f2
push edi
push eax
lea ecx, [esi + 0x40]
push ecx
call fcn.0041ef80
add esp, 0xc
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0xc48]
push edx
push eax
lea ecx, [esp + 0x28]
call fcn.0041cb10
mov ecx, dword [esi + 0xc48]
push edi
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x8dc], 0
call fcn.0041cb10
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
push 0xcc0020
push 0
push 0
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
lea ecx, [esp + 0x14]
call fcn.0041c750
lea ecx, [esp + 0x20]
mov dword [esp + 0x8d4], 0xffffffff
call fcn.0041c750
jmp 0x41f52e
push str.one_of_area_or_format_not_set
push 0x4a72b0
call fcn.00402ee0
add esp, 8
jmp 0x41f52e
mov eax, dword [esi + 0xc44]
push eax
lea ecx, [esp + 0x18]
call fcn.0041c5c0
cmp dword [esi + 4], ebx
mov dword [esp + 0x8d4], 1
jg 0x41f4b2
mov ecx, dword [esp + 0x18]
push edi
push ecx
lea edx, [esi + 0x40]
push edx
call fcn.0041ef80
add esp, 0xc
mov eax, dword [esi + 0x3c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.0041cb10
mov edx, dword [esp + 0x18]
push edi
push edx
lea ecx, [esp + 0x28]
mov byte [esp + 0x8dc], 2
call fcn.0041cb10
mov eax, dword [esp + 0x30]
mov ecx, dword [esi + 0x2c]
mov edx, dword [esi + 0x28]
push 0xcc0020
push 0
push 0
push eax
mov eax, dword [esp + 0x34]
push ecx
push edx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
lea ecx, [esp + 0x20]
call fcn.0041c750
lea ecx, [esp + 0x2c]
mov byte [esp + 0x8d4], 1
call fcn.0041c750
lea ecx, [esp + 0x14]
mov dword [esp + 0x8d4], 0xffffffff
call fcn.0041c660
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x41f544
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x34], ebx
cmp edi, ebx
je 0x41f6ed
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x38]
push edx
push 0x54
push edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x34], ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
jne 0x41f5a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetObject
lea ecx, [esp + 0x6cc]
call fcn.0044ba90
mov esi, eax
push 0x49859c
lea eax, [esp + 0x98]
mov ecx, 0x41
lea edi, [esp + 0x98]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov ecx, dword [esi + 0x28]
mov edi, dword [esi + 4]
mov eax, ecx
imul eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov edx, eax
and edx, reloc.WS2_32.dll_closesocket
mov dword [esi + 0xc40], ecx
jns 0x41f5cb
dec edx
or edx, 0xfffffffc
inc edx
je 0x41f5f3
sub eax, edx
lea eax, [eax*8 + 0x20]
cdq
idiv edi
push eax
push ecx
push str.adjusting_DIB_stride:__d_to__d
push 0x4a72b0
mov dword [esi + 0xc40], eax
call fcn.00402eb0
add esp, 0x10
movzx eax, word [esp + 0x4a]
mov cl, byte [esi + 0xd]
test cl, cl
mov byte [esi + 0xc], 0
mov dword [esi + 4], eax
jne 0x41f60f
cmp eax, 8
jg 0x41f60f
xor ecx, ecx
jmp 0x41f614
mov ecx, 1
cmp eax, 8
mov byte [esi + 0xd], cl
jle 0x41f65d
mov eax, dword [esp + 0x78]
lea ecx, [esi + 0x1c]
push ecx
lea edx, [esi + 0x10]
push edx
push eax
call fcn.0041c440
mov eax, dword [esp + 0x88]
lea ecx, [esi + 0x20]
push ecx
lea edx, [esi + 0x14]
push edx
push eax
call fcn.0041c440
mov eax, dword [esp + 0x98]
lea ecx, [esi + 0x24]
push ecx
lea edx, [esi + 0x18]
push edx
push eax
call fcn.0041c440
add esp, 0x24
jmp 0x41f664
mov ecx, esi
call fcn.0041f0a0
mov al, byte [esi + 0xd]
test al, al
je 0x41f6ed
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x14]
shl eax, cl
mov ecx, dword [esi + 0x20]
shl edx, cl
mov ecx, dword [esi + 0x1c]
mov dword [esi + 8], ebx
or eax, edx
mov edx, dword [esi + 0x10]
shl edx, cl
or eax, edx
je 0x41f69c
xor ecx, ecx
shr eax, 1
inc ecx
cmp eax, ebx
jne 0x41f692
mov dword [esi + 8], ecx
mov eax, dword [esi + 8]
cmp eax, dword [esi + 4]
jle 0x41f6ed
push str.Bad_DIBSection_format__depth_exceeds_bpp_
lea ecx, [esp + 0x5c8]
push 0x100
push ecx
mov byte [esp + 0x5d0], 0
call fcn.0044c260
add esp, 0xc
push 0x498d60
lea edx, [esp + 0x7cc]
mov ecx, 0x40
lea esi, [esp + 0x5c8]
lea edi, [esp + 0x7cc]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
mov ecx, dword [esp + 0x8cc]
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret