Function at 0x402370
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49fb60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x16c
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
push edi
cmp eax, ebx
mov dword [ebp - 0x10], esp
je 0x402881
mov esi, dword [ebp + 0xc]
cmp esi, ebx
je 0x402881
mov ecx, 0x1f
xor eax, eax
lea edi, [ebp - 0x114]
mov byte [ebp - 0x15], bl
rep stosd dword es:[edi], eax
mov eax, dword [esi]
lea ecx, [ebp - 0x114]
push ecx
push esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 4], ebx
mov dword [ebp - 0x114], 0x7c
call dword [eax + 0x58]
cmp eax, ebx
jge 0x402403
lea edx, [ebp - 0x58]
push 0x4a34e8
push edx
mov dword [ebp - 0x58], ebx
call fcn.004920b6
mov edi, dword [ebp - 0x108]
mov eax, dword [esi]
mov ebx, dword [ebp - 0x10c]
lea ecx, [ebp - 0x1c]
push ecx
push esi
mov dword [ebp - 0x48], edi
call dword [eax + 0x44]
test eax, eax
jge 0x402435
lea edx, [ebp - 0x68]
push 0x4a34e8
push edx
mov dword [ebp - 0x68], 1
call fcn.004920b6
mov eax, dword [ebp - 0x1c]
push ebx
push edi
push eax
call dword [sym.imp.gdi32.dll_CreateCompatibleBitmap]
test eax, eax
mov dword [ebp - 0x24], eax
jne 0x40245d
lea ecx, [ebp - 0x40]
push 0x4a34e8
push ecx
mov dword [ebp - 0x40], 2
call fcn.004920b6
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.gdi32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
mov dword [ebp - 0x20], edi
jne 0x40248b
lea eax, [ebp - 0x94]
push 0x4a34e8
push eax
mov dword [ebp - 0x94], 3
call fcn.004920b6
mov ecx, dword [ebp - 0x24]
push ecx
push edi
call dword [sym.imp.gdi32.dll_SelectObject]
mov edx, dword [ebp - 0x1c]
push 0xcc0020
push 0
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x48]
push 0
push edx
push ebx
push eax
push 0
push 0
push edi
call dword [sym.imp.gdi32.dll_BitBlt]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [esi]
push edx
push esi
call dword [ecx + 0x68]
push 0x428
mov dword [ebp - 0x1c], 0
call fcn.00491cd3
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x2c], esi
jne 0x4024f2
lea eax, [ebp - 0x70]
push 0x4a34e8
push eax
mov dword [ebp - 0x70], 4
call fcn.004920b6
mov edx, dword [ebp - 0x20]
mov ecx, 0xa
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x50]
mov dword [esi], 0x28
push ecx
push edx
call dword [sym.imp.gdi32.dll_SelectObject]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov edi, dword [sym.imp.gdi32.dll_GetDIBits]
push 0
push esi
push 0
push ebx
push 0
push eax
push ecx
call edi
test eax, eax
jne 0x402542
lea edx, [ebp - 0x7c]
push 0x4a34e8
push edx
mov dword [ebp - 0x7c], 5
call fcn.004920b6
mov eax, dword [esi + 0x14]
push eax
call fcn.00491cd3
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x40256a
lea ecx, [ebp - 0x34]
push 0x4a34e8
push ecx
mov dword [ebp - 0x34], 6
call fcn.004920b6
mov edx, dword [ebp - 0x24]
push 0
push esi
push eax
mov eax, dword [ebp - 0x20]
push ebx
push 0
push edx
push eax
call edi
test eax, eax
jne 0x402594
lea ecx, [ebp - 0x78]
push 0x4a34e8
push ecx
mov dword [ebp - 0x78], 7
call fcn.004920b6
mov edx, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x30], edi
jne 0x4025cf
lea eax, [ebp - 0x60]
push 0x4a34e8
push eax
mov dword [ebp - 0x60], 8
call fcn.004920b6
mov ebx, dword [sym.imp.kernel32.dll_WriteFile]
xor eax, eax
lea ecx, [ebp - 0x14]
push eax
push ecx
lea edx, [ebp - 0x90]
push 0xe
push edx
push edi
mov word [ebp - 0x90], 0x4d42
mov word [ebp - 0x88], ax
mov word [ebp - 0x8a], ax
call ebx
test eax, eax
jne 0x402618
lea eax, [ebp - 0x80]
push 0x4a34e8
push eax
mov dword [ebp - 0x80], 9
call fcn.004920b6
cmp dword [ebp - 0x14], 0xe
jae 0x402633
lea ecx, [ebp - 0x38]
push 0x4a34e8
push ecx
mov dword [ebp - 0x38], 9
call fcn.004920b6
lea edx, [ebp - 0x14]
push 0
push edx
push 0x28
push esi
push edi
call ebx
test eax, eax
jne 0x402658
lea eax, [ebp - 0x3c]
push 0x4a34e8
push eax
mov dword [ebp - 0x3c], 0xa
call fcn.004920b6
cmp dword [ebp - 0x14], 0x28
jae 0x402673
lea ecx, [ebp - 0x44]
push 0x4a34e8
push ecx
mov dword [ebp - 0x44], 0xa
call fcn.004920b6
mov ecx, dword [esi + 0x10]
mov eax, 3
cmp ecx, eax
je 0x402694
mov cx, word [esi + 0xe]
cmp cx, 8
ja 0x402692
mov eax, 1
shl eax, cl
jmp 0x402694
xor eax, eax
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40269d
mov eax, ecx
test eax, eax
je 0x4026ed
lea edx, [ebp - 0x14]
lea ebx, [eax*4]
push 0
push edx
lea eax, [esi + 0x28]
push ebx
push eax
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
jne 0x4026d3
lea ecx, [ebp - 0x4c]
push 0x4a34e8
push ecx
mov dword [ebp - 0x4c], 0xb
call fcn.004920b6
cmp dword [ebp - 0x14], ebx
jae 0x4026ed
lea edx, [ebp - 0x54]
push 0x4a34e8
push edx
mov dword [ebp - 0x54], 0xb
call fcn.004920b6
mov ebx, dword [sym.imp.kernel32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call ebx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x86], eax
mov ecx, dword [esi + 0x14]
lea eax, [ebp - 0x14]
push 0
push eax
push ecx
push edx
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
jne 0x402730
lea eax, [ebp - 0x5c]
push 0x4a34e8
push eax
mov dword [ebp - 0x5c], 0xc
call fcn.004920b6
mov ecx, dword [ebp - 0x14]
mov eax, dword [esi + 0x14]
cmp ecx, eax
jae 0x40274f
lea edx, [ebp - 0x64]
push 0x4a34e8
push edx
mov dword [ebp - 0x64], 0xc
call fcn.004920b6
push 1
push 0
push 0
push edi
call ebx
push 0
push 0
push 0
push edi
mov dword [ebp - 0x8e], eax
call ebx
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x90]
push 0xe
push ecx
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
jne 0x402796
lea edx, [ebp - 0x6c]
push 0x4a34e8
push edx
mov dword [ebp - 0x6c], 0xd
call fcn.004920b6
cmp dword [ebp - 0x14], 0xe
jae 0x4027b1
lea eax, [ebp - 0x74]
push 0x4a34e8
push eax
mov dword [ebp - 0x74], 0xd
call fcn.004920b6
push 0x4a6108
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
mov bl, 1
jmp 0x40280b
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x402823
mov ecx, dword [ebp + 0xc]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x68]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x402831
push eax
call dword [sym.imp.gdi32.dll_DeleteDC]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x402841
mov ecx, eax
push ecx
call dword [sym.imp.gdi32.dll_DeleteObject]
test esi, esi
je 0x40284e
push esi
call fcn.00491cc8
add esp, 4
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x402860
mov edx, eax
push edx
call fcn.00491cc8
add esp, 4
cmp edi, 0xffffffff
je 0x40286c
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8