Function at 0x436988
Capabilities:
Write file on windows

Disassembly:
push edi
pop edi
push ebp
push esp
pop ebp
sub esp, 0x30
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x30], edi
test ecx, ecx
jne 0x4369b6
sub eax, eax
jmp 0x436b84
test edi, edi
jne 0x4369d9
call fcn.00431d5a
and dword [eax], edi
call fcn.00431d6d
mov dword [eax], 0x16
call fcn.00431cb1
or eax, 0xffffffff
jmp 0x436b84
push ebx
push esi
pop eax
push esi
pop ebx
sar ebx, 6
and eax, 0x3f
imul edx, eax, 0x30
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebx*4 + 0x4423d0]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], edx
mov bl, byte [eax + edx + 0x29]
cmp bl, 2
je 0x436a05
cmp bl, 1
jne 0x436a2d
mov eax, ecx
not eax
test al, 1
jne 0x436a2a
call fcn.00431d5a
and dword [eax], 0
call fcn.00431d6d
mov dword [eax], 0x16
call fcn.00431cb1
jmp 0x436b7b
mov eax, dword [ebp - 0x2c]
test byte [eax + edx + 0x28], 0x20
je 0x436a43
push 2
push 0
push 0
push esi
call fcn.00436e8b
add esp, 0x10
push esi
call fcn.0043652d
pop ecx
test al, al
je 0x436a87
test bl, bl
je 0x436a74
dec bl
cmp bl, 1
ja 0x436b4b
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.004364c0
add esp, 0xc
push eax
pop esi
jmp 0x436b10
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push edi
push esi
push eax
call fcn.0043630d
add esp, 0x10
jmp 0x436a6d
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax*4 + 0x4423d0]
mov eax, dword [ebp - 0x18]
test byte [ecx + eax + 0x28], 0x80
je 0x436ae1
movsx eax, bl
sub eax, 0
je 0x436ad1
sub eax, 1
je 0x436ac1
sub eax, 1
jne 0x436b4b
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push edi
push esi
push eax
call fcn.00436682
jmp 0x436a82
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push edi
push esi
push eax
call 0x436770
jmp 0x436a82
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push edi
push esi
push eax
call 0x4365a3
jmp 0x436a82
mov eax, dword [ecx + eax + 0x18]
xor ecx, ecx
push ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
jne 0x436b0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
lea esi, [ebp - 0x14]
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x436b80
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x436b48
push 5
pop esi
cmp eax, esi
jne 0x436b3f
call fcn.00431d6d
mov dword [eax], 9
call fcn.00431d5a
mov dword [eax], esi
jmp 0x436b7b
push eax
call fcn.00431d37
pop ecx
jmp 0x436b7b
mov edi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax*4 + 0x4423d0]
test byte [eax + ecx + 0x28], 0x40
je 0x436b68
cmp byte [edi], 0x1a
jne 0x436b68
sub eax, eax
jmp 0x436b83
call fcn.00431d6d
mov dword [eax], 0x1c
call fcn.00431d5a
and dword [eax], 0
or eax, 0xffffffff
jmp 0x436b83
sub eax, dword [ebp - 0x20]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0042d53e
mov esp, ebp
pop ebp
ret