Function at 0x10010380
Capabilities:
Enumerate pe sections
Write file on windows

Disassembly:
sub esp, 0x81c
push ebx
mov ebx, dword [esp + 0x824]
push ebp
push esi
mov al, byte [ebx + 4]
mov esi, dword [esp + 0x834]
push edi
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x1c], edi
test al, 1
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edi
je 0x100103e3
cmp dword [ebx + 0x28], edi
jne 0x100103e3
push esi
push ebx
call fcn.1000deb0
add esp, 8
test eax, eax
jne 0x100103e3
mov eax, dword [esi + 0xc988]
lea ecx, [esi + 0xc77e]
add eax, 4
mov dword [ebx + 0x4c], ecx
mov dword [ebx + 0x28], eax
mov dword [esp + 0x1c], 1
cmp dword [esi + 0x91a], edi
jne 0x100103fc
mov eax, dword [ebx + 0x54]
lea edx, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.USER32.dll_CharToOemA]
jmp 0x1001040b
mov ecx, dword [ebx + 0x54]
lea edx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [esi + 0x91e], edi
je 0x1001060b
mov eax, dword [ebx + 0x1c]
mov ecx, dword [ebx + 0x18]
cmp eax, edi
mov ebp, 0x1000
jg 0x1001046c
jl 0x10010431
or edx, 0xffffffff
cmp ecx, edx
jae 0x1001046f
jmp 0x10010434
or edx, 0xffffffff
cmp dword [ebx + 0x14], edi
jg 0x1001046f
jl 0x10010440
cmp dword [ebx + 0x10], edx
jae 0x1001046f
cmp dword [ebx + 0x40], edi
jg 0x1001046f
jl 0x1001044c
cmp dword [ebx + 0x3c], edx
jae 0x1001046f
test word [esi + 0x4ee0], bp
jne 0x10010575
xor ebp, ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
jmp 0x1001060b
or edx, 0xffffffff
test word [esi + 0x4ee0], bp
jne 0x10010575
cmp eax, edi
jl 0x10010522
jg 0x1001048a
cmp ecx, edx
jb 0x100104aa
cmp dword [ebx + 0x14], edi
jl 0x100104aa
jg 0x10010496
cmp dword [ebx + 0x10], edx
jb 0x100104aa
cmp dword [ebx + 0x40], edi
jg 0x10010575
jl 0x100104aa
cmp dword [ebx + 0x3c], edx
jae 0x10010575
cmp eax, edi
jl 0x10010522
jg 0x100104b4
cmp ecx, edx
jb 0x10010522
cmp dword [ebx + 0x14], edi
jl 0x10010522
jg 0x100104c0
cmp dword [ebx + 0x10], edx
jb 0x10010522
mov eax, dword [ebx + 0x28]
mov dword [esp + 0x10], 0x14
add eax, 0x14
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
add esp, 4
cmp ebp, edi
mov dword [esp + 0x14], ebp
jne 0x100104f1
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x81c
ret
mov word [ebp], 1
mov word [ebp + 2], 0x10
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0x18], 2
mov dword [ebp + 4], ecx
mov edx, dword [ebx + 0x1c]
mov dword [ebp + 8], edx
mov eax, dword [ebx + 0x10]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebx + 0x14]
mov dword [ebp + 0x10], ecx
jmp 0x100105de
mov edx, dword [ebx + 0x28]
mov dword [esp + 0x10], 0xc
add edx, 0xc
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
add esp, 4
cmp ebp, edi
mov dword [esp + 0x14], ebp
jne 0x10010553
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x81c
ret
mov word [ebp], 1
mov word [ebp + 2], 8
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x18], 1
mov dword [ebp + 4], eax
mov ecx, dword [ebx + 0x1c]
mov dword [ebp + 8], ecx
jmp 0x100105de
mov edx, dword [ebx + 0x28]
mov dword [esp + 0x10], 0x1c
add edx, 0x1c
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
add esp, 4
cmp ebp, edi
mov dword [esp + 0x14], ebp
jne 0x100105a6
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x81c
ret
mov word [ebp], 1
mov word [ebp + 2], 0x18
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x18], 3
mov dword [ebp + 4], eax
mov ecx, dword [ebx + 0x1c]
mov dword [ebp + 8], ecx
mov edx, dword [ebx + 0x10]
mov dword [ebp + 0xc], edx
mov eax, dword [ebx + 0x14]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebx + 0x3c]
mov dword [ebp + 0x14], ecx
mov edx, dword [ebx + 0x40]
mov dword [ebp + 0x18], edx
mov ecx, dword [ebx + 0x28]
cmp ecx, edi
jbe 0x1001060b
mov edi, dword [esp + 0x10]
mov esi, dword [ebx + 0x4c]
and edi, 0xffff
mov eax, ecx
add edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x838]
xor edi, edi
test byte [esi + 0x4ee1], 0x80
je 0x10010649
mov eax, dword [esi + 0x4ee6]
cmp eax, 0xffff
mov eax, dword [esi + 0x4ee2]
jne 0x1001062f
mov dword [esi + 0x4ee6], eax
jmp 0x10010637
cmp eax, dword [esi + 0x4eea]
je 0x10010643
mov dword [esi + 0x4eea], eax
mov dword [esi + 0x4ef2], edi
inc dword [esi + 0x4ef2]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2c]
mov edx, dword [ebx + 0x20]
and ecx, 0xffff
add ecx, eax
add ecx, edx
mov edx, dword [ebx + 0x28]
lea eax, [ecx + edx + 0x2e]
mov ecx, dword [esi + 0xa2]
cmp ecx, 0xffffffff
mov dword [esp + 0x24], eax
je 0x100108b7
cmp dword [esi + 0x4f0e], edi
jne 0x100108b7
push esi
call fcn.1000c660
add esp, 4
cmp edx, edi
jg 0x100106c9
jl 0x10010698
cmp eax, dword [esp + 0x24]
jae 0x100106c9
mov eax, dword [esp + 0x834]
push esi
push eax
call fcn.1000c760
mov esi, eax
add esp, 8
test esi, esi
je 0x100106c9
test ebp, ebp
je 0x100106bc
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret
mov ecx, dword [esp + 0x24]
inc ecx
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x10010897
mov dword [ebp], 0x2014b50
mov dx, word [ebx]
mov word [ebp + 4], dx
mov ax, word [ebx + 2]
mov word [ebp + 6], ax
mov cx, word [ebx + 4]
mov word [ebp + 8], cx
mov dx, word [ebx + 6]
mov word [ebp + 0xa], dx
mov eax, dword [ebx + 8]
mov dword [ebp + 0xc], eax
mov ecx, dword [ebx + 0xc]
mov dword [ebp + 0x10], ecx
mov ecx, dword [esp + 0x18]
cmp ecx, 1
je 0x1001073e
jle 0x10010730
cmp ecx, 3
jg 0x10010730
lea eax, [ebp + 0x14]
or edx, 0xffffffff
mov dword [eax], edx
mov dword [eax + 4], edx
jmp 0x10010747
mov edx, dword [ebx + 0x10]
mov dword [ebp + 0x14], edx
mov eax, dword [ebx + 0x18]
mov dword [ebp + 0x18], eax
jmp 0x10010747
lea edx, [ebp + 0x18]
mov dword [edx], 0xffffffff
mov ax, word [ebx + 0x20]
mov esi, dword [esp + 0x10]
mov word [ebp + 0x1c], ax
mov dx, word [ebx + 0x28]
add esi, edx
mov ax, si
mov dword [esp + 0x10], esi
mov word [ebp + 0x1e], ax
sub ax, word [ebx + 0x28]
cmp ecx, 3
mov word [esp + 0x10], ax
mov ax, word [ebx + 0x2c]
mov word [ebp + 0x20], ax
mov dx, word [ebx + 0x30]
mov word [ebp + 0x22], dx
mov ax, word [ebx + 0x34]
mov word [ebp + 0x24], ax
mov edx, dword [ebx + 0x38]
mov dword [ebp + 0x26], edx
je 0x10010798
mov eax, dword [ebx + 0x3c]
mov dword [ebp + 0x2a], eax
jmp 0x100107a1
lea ecx, [ebp + 0x2a]
mov dword [ecx], 0xffffffff
mov ecx, dword [ebx + 0x20]
lea esi, [esp + 0x2c]
mov edx, ecx
lea edi, [ebp + 0x2e]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x18]
mov ecx, edx
and ecx, 3
test eax, eax
mov eax, dword [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
je 0x100107d8
mov esi, dword [ebx + 0x28]
mov ecx, eax
and ecx, 0xffff
add ecx, esi
mov esi, dword [esp + 0x14]
jmp 0x100107e2
mov ecx, dword [ebx + 0x28]
test ecx, ecx
jbe 0x100107f7
mov esi, dword [ebx + 0x4c]
mov edx, dword [ebx + 0x20]
lea edi, [edx + ebp + 0x2e]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
jbe 0x10010822
mov edx, dword [ebx + 0x20]
mov edi, dword [ebx + 0x28]
and eax, 0xffff
mov esi, dword [ebx + 0x50]
add eax, edx
add eax, edi
lea edi, [eax + ebp + 0x2e]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x838]
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x20]
push 0
mov eax, dword [edx + 0xa2]
push ecx
push esi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001086e
cmp dword [esp + 0x20], esi
jne 0x1001086e
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x10010a8b
mov dword [ebx + 0x4c], 0
jmp 0x10010a8b
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1001087d
mov dword [ebx + 0x4c], 0
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x10010b05
jmp 0x10010afc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x100108a6
mov dword [ebx + 0x4c], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10010b05
jmp 0x10010afc
mov ecx, dword [esp + 0x834]
push esi
push edi
push eax
push ecx
push edi
call fcn.1000bdd0
add esp, 0x14
test eax, eax
je 0x100108f6
cmp ebp, edi
je 0x100108dc
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, dword [esi + 0x9a]
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xf6
pop ebp
add eax, 0x13
pop ebx
add esp, 0x81c
ret
mov edx, dword [esp + 0x24]
inc edx
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x10010ae5
mov dword [ebp], 0x2014b50
mov ax, word [ebx]
mov word [ebp + 4], ax
mov cx, word [ebx + 2]
mov word [ebp + 6], cx
mov dx, word [ebx + 4]
mov word [ebp + 8], dx
mov ax, word [ebx + 6]
mov word [ebp + 0xa], ax
mov ecx, dword [ebx + 8]
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx + 0xc]
cmp ecx, 1
mov dword [ebp + 0x10], edx
je 0x1001096b
jle 0x1001095d
cmp ecx, 3
jg 0x1001095d
lea edx, [ebp + 0x14]
or eax, 0xffffffff
mov dword [edx], eax
mov dword [edx + 4], eax
jmp 0x10010974
mov eax, dword [ebx + 0x10]
mov dword [ebp + 0x14], eax
mov edx, dword [ebx + 0x18]
mov dword [ebp + 0x18], edx
jmp 0x10010974
lea eax, [ebp + 0x18]
mov dword [eax], 0xffffffff
mov dx, word [ebx + 0x20]
mov esi, dword [esp + 0x10]
mov word [ebp + 0x1c], dx
mov ax, word [ebx + 0x28]
add esi, eax
mov ax, si
mov dword [esp + 0x10], esi
mov word [ebp + 0x1e], ax
sub ax, word [ebx + 0x28]
mov dx, word [ebx + 0x2c]
cmp ecx, 3
mov word [esp + 0x10], ax
mov word [ebp + 0x20], dx
mov ax, word [ebx + 0x30]
mov word [ebp + 0x22], ax
mov dx, word [ebx + 0x34]
mov word [ebp + 0x24], dx
mov eax, dword [ebx + 0x38]
mov dword [ebp + 0x26], eax
je 0x100109c5
mov ecx, dword [ebx + 0x3c]
mov dword [ebp + 0x2a], ecx
jmp 0x100109ce
lea edx, [ebp + 0x2a]
mov dword [edx], 0xffffffff
mov ecx, dword [ebx + 0x20]
lea esi, [esp + 0x2c]
mov eax, ecx
lea edi, [ebp + 0x2e]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
test eax, eax
mov eax, dword [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
je 0x10010a05
mov esi, dword [ebx + 0x28]
mov ecx, eax
and ecx, 0xffff
add ecx, esi
mov esi, dword [esp + 0x14]
jmp 0x10010a0f
mov ecx, dword [ebx + 0x28]
test ecx, ecx
jbe 0x10010a24
mov esi, dword [ebx + 0x4c]
mov edx, dword [ebx + 0x20]
lea edi, [edx + ebp + 0x2e]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
jbe 0x10010a4f
mov edx, dword [ebx + 0x20]
mov edi, dword [ebx + 0x28]
and eax, 0xffff
mov esi, dword [ebx + 0x50]
add eax, edx
add eax, edi
lea edi, [eax + ebp + 0x2e]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x834]
mov esi, dword [esp + 0x24]
xor edi, edi
lea ecx, [esp + 0x20]
mov eax, dword [edx]
push edi
push ecx
push esi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10010ac9
cmp dword [esp + 0x20], esi
jne 0x10010ac9
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, edi
je 0x10010a8b
mov dword [ebx + 0x4c], edi
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x10010ab5
mov eax, dword [esp + 0x10]
push ecx
and eax, 0xffff
mov dword [ebx + 0x60], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret
pop edi
pop esi
mov dword [ebx + 0x60], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x81c
ret
cmp dword [esp + 0x1c], edi
je 0x10010ad2
mov dword [ebx + 0x4c], edi
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, edi
je 0x10010b05
jmp 0x10010afc
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10010af4
mov dword [ebx + 0x4c], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10010b05
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x81c
ret