Function at 0x46db10
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3c]
push edi
mov eax, dword [esi + 0x1680c]
test eax, eax
mov eax, dword [esi + 0x16804]
je 0x46db5c
mov ecx, dword [esi + 0x16800]
mov dword [esi + 0x16804], 0
add ecx, eax
pop edi
mov dword [esi + 0x16800], ecx
mov ecx, dword [esi + 0x15ff4]
mov dword [esi + 0x15ff8], ecx
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x2c
ret
test eax, eax
je 0x46e53c
cdq
mov ebp, eax
mov eax, dword [esi + 0x4c]
mov ebx, edx
mov dword [esp + 0x24], ebp
test eax, eax
mov dword [esp + 0x28], ebx
jne 0x46dbc5
mov eax, dword [esi + 0x54]
test eax, eax
jne 0x46dbc5
mov ebx, dword [esi + 0x3d40]
mov eax, dword [esi + 0x3d44]
mov ecx, dword [esi + 0x455c]
mov edx, dword [esi + 0x4558]
mov edi, ebx
add edi, ebp
adc eax, dword [esp + 0x28]
cmp eax, ecx
jl 0x46dbc1
jg 0x46dba9
cmp edi, edx
jbe 0x46dbc1
mov eax, dword [esi + 0x3d44]
sub edx, ebx
sbb ecx, eax
mov ebp, edx
mov ebx, ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
jmp 0x46dbc5
mov ebx, dword [esp + 0x28]
test ebx, ebx
jg 0x46dc10
jl 0x46dbcf
test ebp, ebp
ja 0x46dc10
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x46dbe8
mov dword [esi], 1
mov dword [esi + 0x24], 1
jmp 0x46e3b3
mov eax, dword [esi + 0x54]
mov dword [esi], 1
test eax, eax
je 0x46dc01
mov dword [esi + 0x24], 1
jmp 0x46e3b3
mov dword [esi + 0x1680c], 2
jmp 0x46e3b3
mov edx, dword [esi + 0x15ff4]
push esi
push ebp
push edx
call fcn.0046ec60
mov eax, dword [esi + 0x3d30]
add esp, 0xc
test eax, eax
jne 0x46dd86
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x46dd91
mov eax, dword [esi + 0x54]
test eax, eax
jne 0x46dd86
cmp dword [esi + 0x45c8], 0x4000
jne 0x46dd13
mov edi, dword [esi + 0x15ffc]
mov dword [esp + 0x2c], ebp
mov ebp, ebx
xor ebx, ebx
mov byte [esp + 0x40], 0xd
mov byte [esp + 0x41], 0xa
test ebx, ebx
jne 0x46e3b3
cmp byte [edi], 0xa
jne 0x46dcbf
mov ecx, dword [esi + 0x90]
mov edx, dword [esi + 0x16808]
add ecx, 1
push ebx
mov dword [esi + 0x90], ecx
mov eax, dword [esi + 0x94]
adc eax, ebx
lea ecx, [esp + 0x44]
mov dword [esi + 0x94], eax
lea eax, [esp + 0x18]
push eax
push 2
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46dce2
mov eax, dword [esp + 0x14]
test eax, eax
ja 0x46dce7
jmp 0x46dce2
mov ecx, dword [esi + 0x16808]
lea eax, [esp + 0x14]
push 0
push eax
push 1
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46dce2
mov eax, dword [esp + 0x14]
test eax, eax
ja 0x46dce7
mov ebx, 1
mov edx, dword [esp + 0x2c]
inc edi
add edx, 0xffffffff
adc ebp, 0xffffffff
mov dword [esp + 0x2c], edx
test ebp, ebp
jg 0x46dc6d
jl 0x46e3b3
mov eax, edx
test eax, eax
ja 0x46dc6d
jmp 0x46e3b3
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0x14
mov dword [esp + 0x14], 0
test edi, edi
jle 0x46dd61
mov eax, dword [esi + 0x15ffc]
mov ecx, dword [esi + 0x16808]
lea edx, [esp + 0x14]
push 0
push edx
push ebp
push eax
push ecx
call ebx
test eax, eax
mov eax, dword [esp + 0x14]
je 0x46dd56
cmp eax, ebp
je 0x46e3b3
mov ebp, dword [esp + 0x24]
test eax, eax
jne 0x46dd5d
dec edi
jmp 0x46dd26
xor edi, edi
jmp 0x46dd26
mov eax, dword [esi + 0x3d24]
test eax, eax
jne 0x46e3b3
mov dword [esi + 0x1680c], 2
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x46dfdc
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x46dfdc
mov edx, dword [esi + 0x15ffc]
mov eax, dword [esi + 0x88]
mov edi, dword [esi + 0x4558]
mov ecx, dword [esi + 0x94]
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x80]
mov ebp, dword [esi + 0x455c]
add edx, eax
mov eax, dword [esi + 0x90]
mov ebx, eax
add ebx, edi
mov edi, ecx
adc edi, ebp
mov ebp, dword [esi + 0x74]
cmp edi, ebp
jg 0x46de04
jl 0x46dde2
cmp ebx, dword [esi + 0x70]
jae 0x46de04
mov edi, dword [esi + 0x78]
mov ebp, dword [esi + 0x7c]
mov ebx, dword [esi + 0x4558]
sub eax, edi
mov edi, dword [esi + 0x455c]
sbb ecx, ebp
add eax, ebx
adc ecx, edi
mov dword [esp + 0x2c], eax
mov ebx, ecx
jmp 0x46de0d
mov eax, dword [esi + 0x70]
mov ebx, ebp
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x30], ebx
mov ecx, dword [esi + 0x9c]
mov eax, dword [esi + 0x98]
cmp ecx, dword [esi + 0x7c]
jl 0x46df44
jg 0x46de39
cmp eax, dword [esi + 0x78]
jb 0x46df44
mov eax, dword [esi + 0x8c]
mov ecx, dword [esi + 0x88]
cmp eax, dword [esi + 0x74]
jg 0x46dfc1
jl 0x46de59
cmp ecx, dword [esi + 0x70]
jae 0x46dfc1
cmp dword [esi + 0x45c8], 0x4000
jne 0x46df32
cmp eax, ebx
jg 0x46dfa6
mov eax, dword [esp + 0x2c]
jl 0x46de7f
cmp ecx, eax
jae 0x46dfa6
cmp byte [edi], 0xa
jne 0x46dee0
mov byte [edx], 0xd
mov ecx, dword [esi + 0x74]
inc edx
cmp ebx, ecx
jg 0x46dec2
jl 0x46de96
cmp eax, dword [esi + 0x70]
jae 0x46dec2
mov ecx, dword [esi + 0x90]
add ecx, 1
mov dword [esi + 0x90], ecx
mov ecx, dword [esi + 0x94]
adc ecx, 0
add eax, 1
adc ebx, 0
mov dword [esi + 0x94], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov ecx, dword [esi + 0x88]
add ecx, 1
mov dword [esi + 0x88], ecx
mov ecx, dword [esi + 0x8c]
adc ecx, 0
mov dword [esi + 0x8c], ecx
mov ecx, dword [esi + 0x8c]
cmp ecx, ebx
jg 0x46dfa6
jl 0x46defe
mov ecx, dword [esi + 0x88]
cmp ecx, eax
jae 0x46dfa6
mov al, byte [edi]
mov byte [edx], al
mov ecx, dword [esi + 0x88]
inc edx
inc edi
add ecx, 1
mov dword [esi + 0x88], ecx
mov eax, dword [esi + 0x8c]
adc eax, 0
add ebp, 0xffffffff
mov dword [esi + 0x8c], eax
mov eax, dword [esp + 0x28]
adc eax, 0xffffffff
mov dword [esp + 0x28], eax
jmp 0x46df87
cmp eax, ebx
jg 0x46dfa6
jl 0x46df3e
cmp ecx, dword [esp + 0x2c]
jae 0x46dfa6
mov cl, byte [edi]
mov byte [edx], cl
jmp 0x46df02
add eax, 1
adc ecx, 0
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], ecx
mov ebx, dword [esi + 0x9c]
mov ecx, dword [esi + 0x45e2]
xor eax, eax
cmp ebx, eax
jg 0x46dfa6
jl 0x46df74
mov eax, dword [esi + 0x98]
cmp eax, ecx
jae 0x46dfa6
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
add ebp, 0xffffffff
adc ecx, 0xffffffff
inc edi
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x28]
test eax, eax
jg 0x46de19
jl 0x46df9d
test ebp, ebp
ja 0x46de19
mov dword [esp + 0x24], ebp
jmp 0x46e3b3
mov dword [esi + 0x1680c], 3
pop edi
mov dword [esp + 0x20], ebp
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x2c
ret
mov dword [esi + 0x1680c], 2
pop edi
mov dword [esp + 0x20], ebp
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x54]
test eax, eax
jne 0x46dff2
mov eax, dword [esi + 0x50]
test eax, eax
je 0x46e3b3
mov ebp, dword [esp + 0x24]
mov eax, dword [esi + 0x45c8]
mov dword [esp + 0x1c], 3
cmp eax, 0x4000
mov edi, ebp
jne 0x46e084
lea ecx, [ebp + ebp]
push ecx
call fcn.004adbfa
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x40], edx
je 0x46e06d
xor ecx, ecx
test ebp, ebp
jle 0x46e067
mov ebx, dword [esi + 0x15ffc]
cmp byte [ecx + ebx], 0xa
jne 0x46e055
mov byte [eax], 0xd
mov ebx, dword [esi + 0x90]
inc eax
add ebx, 1
mov dword [esi + 0x90], ebx
mov ebx, dword [esi + 0x94]
adc ebx, 0
inc edi
mov dword [esi + 0x94], ebx
mov ebx, dword [esi + 0x15ffc]
inc eax
mov bl, byte [ecx + ebx]
inc ecx
mov byte [eax - 1], bl
cmp ecx, ebp
jl 0x46e026
mov dword [esp + 0x10], edx
jmp 0x46e096
mov dword [esi + 0x1680c], 2
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x2c
ret
mov edx, dword [esi + 0x15ffc]
mov dword [esp + 0x40], 0
mov dword [esp + 0x10], edx
mov eax, dword [esi + 0x50]
test eax, eax
je 0x46e2ff
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x4558]
mov ecx, dword [esi + 0x94]
mov ebp, dword [esi + 0x455c]
mov ebx, eax
add ebx, edx
mov edx, ecx
adc edx, ebp
mov ebp, dword [esi + 0x74]
cmp edx, ebp
jg 0x46e0f3
jl 0x46e0cf
cmp ebx, dword [esi + 0x70]
jae 0x46e0f3
mov edx, dword [esi + 0x78]
mov ebp, dword [esi + 0x7c]
mov ebx, dword [esi + 0x4558]
sub eax, edx
mov edx, dword [esi + 0x455c]
sbb ecx, ebp
add eax, ebx
adc ecx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
jmp 0x46e0fe
mov eax, dword [esi + 0x70]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + 0x68]
mov ebx, dword [esi + 0x6c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x34], ecx
test edi, edi
jbe case.0x46e383.0
mov eax, dword [esi + 0x9c]
mov edx, dword [esi + 0x7c]
mov ecx, dword [esi + 0x98]
cmp eax, edx
jl 0x46e228
jg 0x46e13a
cmp ecx, dword [esi + 0x78]
jb 0x46e228
mov ebp, dword [esi + 0x8c]
mov eax, dword [esi + 0x74]
mov edx, dword [esi + 0x88]
cmp ebp, eax
jg 0x46e28e
jl 0x46e15c
cmp edx, dword [esi + 0x70]
jae 0x46e28e
mov ecx, edi
xor eax, eax
add ecx, edx
mov edx, dword [esp + 0x30]
adc eax, ebp
cmp eax, edx
jl 0x46e188
jg 0x46e174
cmp ecx, dword [esp + 0x2c]
jbe 0x46e188
mov edi, dword [esp + 0x2c]
mov eax, dword [esi + 0x88]
sub edi, eax
mov dword [esp + 0x1c], 0
mov eax, dword [esi + 0x4584]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x38]
mov ecx, ebx
push eax
mov eax, dword [esi + 0x60]
push ebx
sar ecx, 0x1f
push edx
mov edx, dword [esi + 0x64]
mov ecx, 0x20
mov dword [esp + 0x28], edi
call fcn.004b56a0
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esi + 0x60]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
push 1
call dword [esi + 0x4580]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esi + 0x88]
mov eax, ecx
cdq
add ebp, eax
mov dword [esi + 0x88], ebp
mov ebp, dword [esi + 0x8c]
adc ebp, edx
cmp ecx, edi
mov dword [esi + 0x8c], ebp
jae 0x46e20c
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x34]
add eax, ecx
sub edi, ecx
add edx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x34], edx
adc ebx, 0
jmp 0x46e214
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x1c]
mov ecx, 3
cmp eax, ecx
ja case.0x46e221.2
jmp dword [eax*4 + 0x46e548]
add ecx, 1
adc eax, 0
mov dword [esi + 0x98], ecx
mov ecx, dword [esi + 0x45e2]
mov dword [esi + 0x9c], eax
mov edx, dword [esi + 0x9c]
xor eax, eax
cmp edx, eax
jg 0x46e2c3
jl 0x46e258
mov eax, dword [esi + 0x98]
cmp eax, ecx
jae 0x46e2c3
mov eax, dword [esp + 0x10]
dec edi
inc eax
mov dword [esp + 0x10], eax
jmp 0x46e110
mov eax, dword [esp + 0x20]
test eax, eax
jne case.0x46e383.0
jmp 0x46e110
mov dword [esi + 0x1680c], ecx
jmp 0x46e2cd
mov dword [esi + 0x1680c], ecx
mov dword [esi], 1
jmp 0x46e2cd
mov eax, dword [esi + 0x45c8]
mov dword [esi + 0x1680c], 2
cmp eax, 0x4000
jne 0x46e2b6
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e2b6
push eax
call fcn.004ad74d
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
add esp, 0x2c
ret
mov dword [esi + 0x1680c], 3
cmp dword [esi + 0x45c8], 0x4000
jne 0x46e4c7
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e4c7
push eax
call fcn.004ad74d
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov ebp, dword [esi + 0x68]
mov ebx, dword [esi + 0x6c]
mov dword [esp + 0x20], 0
test edi, edi
jbe case.0x46e383.0
mov edx, dword [esi + 0x4584]
lea ecx, [esp + 0x1c]
mov eax, ebx
push ecx
push edx
mov edx, dword [esi + 0x64]
sar eax, 0x1f
mov eax, dword [esi + 0x60]
push ebx
push ebp
mov ecx, 0x20
mov dword [esp + 0x28], edi
call fcn.004b56a0
mov ecx, dword [esi + 0x60]
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
push 1
call dword [esi + 0x4580]
mov eax, dword [esp + 0x18]
cmp eax, edi
jae 0x46e36e
mov ecx, dword [esp + 0x10]
sub edi, eax
add ecx, eax
add ebp, eax
mov dword [esp + 0x10], ecx
adc ebx, 0
jmp 0x46e376
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x1c]
cmp eax, 3
ja case.default.0x46e383
jmp dword [eax*4 + 0x46e558]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46e30d
cmp dword [esi + 0x45c8], 0x4000
jne 0x46e3b3
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e3b3
push eax
call fcn.004ad74d
add esp, 4
mov ecx, dword [esi + 0x16804]
mov edx, dword [esi + 0x16800]
mov eax, dword [esi + 0x4c]
add edx, ecx
mov dword [esi + 0x16800], edx
mov edx, dword [esi + 0x15ff4]
test eax, eax
mov dword [esi + 0x16804], 0
mov dword [esi + 0x15ff8], edx
jne 0x46e3fa
mov eax, dword [esi + 0x54]
test eax, eax
je 0x46e50a
mov eax, dword [esi + 0x50]
test eax, eax
je 0x46e4d4
mov eax, dword [esi + 0x88]
mov ecx, dword [esi + 0x8c]
mov dword [esi + 0x68], eax
mov dword [esi + 0x3d40], eax
mov dword [esi + 0x6c], ecx
mov dword [esi + 0x3d44], ecx
jmp 0x46e526
mov eax, dword [esi + 0x45c8]
mov dword [esi + 0x1680c], 3
cmp eax, 0x4000
jne 0x46e4c7
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e4c7
mov ecx, eax
push ecx
call fcn.004ad74d
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x45c8]
mov dword [esi + 0x1680c], 3
cmp eax, 0x4000
mov dword [esi], 1
jne 0x46e4c7
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e4c7
mov edx, eax
push edx
call fcn.004ad74d
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x45c8]
mov dword [esi + 0x1680c], 3
cmp eax, 0x4000
mov dword [esi], 1
jne 0x46e4c7
mov eax, dword [esp + 0x40]
test eax, eax
je 0x46e4c7
push eax
call fcn.004ad74d
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x24]
mov ebx, dword [esi + 0x3d40]
mov ecx, dword [esp + 0x28]
mov edx, dword [esi + 0x68]
add ebx, eax
mov dword [esi + 0x3d40], ebx
mov edi, dword [esi + 0x3d44]
adc edi, ecx
add edx, eax
mov dword [esi + 0x68], edx
mov eax, dword [esi + 0x6c]
adc eax, ecx
mov dword [esi + 0x3d44], edi
mov dword [esi + 0x6c], eax
jmp 0x46e526
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0x3d40]
add ecx, eax
mov dword [esi + 0x3d40], ecx
mov ecx, dword [esp + 0x28]
adc dword [esi + 0x3d44], ecx
mov edx, dword [esi + 0x3d44]
mov eax, dword [esi + 0x3d40]
push edx
push eax
call fcn.004690d0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret