Function at 0x100475e7
Capabilities:
Write file on windows

Disassembly:
push 0x318
mov eax, 0x100897f9
call fcn.10063057
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2e8], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2dc], eax
xor ebx, ebx
xor eax, eax
mov byte [ebp - 0x2c8], bl
lea edi, [ebp - 0x2c7]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x50
stosb byte es:[edi], al
lea eax, [ebp - 0x2b8]
push ebx
push eax
mov dword [ebp - 0x2d4], ebx
mov dword [ebp - 0x2d8], ebx
mov dword [ebp - 0x2f8], ebx
mov dword [ebp - 0x2f4], ebx
call fcn.100620c0
xor eax, eax
mov dword [ebp - 0x314], ebx
lea edi, [ebp - 0x310]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x4f
stosd dword es:[edi], eax
lea eax, [ebp - 0x267]
push ebx
push eax
mov byte [ebp - 0x268], bl
call fcn.100620c0
xor eax, eax
mov dword [ebp - 0x324], ebx
lea edi, [ebp - 0x320]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x103
stosd dword es:[edi], eax
lea eax, [ebp - 0x113]
push ebx
push eax
mov byte [ebp - 0x114], bl
call fcn.100620c0
mov edi, 0x104
push edi
lea eax, [ebp - 0x218]
push ebx
push eax
mov dword [ebp - 0x2fc], ebx
mov dword [ebp - 0x2f0], ebx
mov dword [ebp - 0x2ec], ebx
call fcn.100620c0
add esp, 0x30
lea eax, [ebp - 0x2fc]
push eax
lea eax, [ebp - 0x218]
push eax
push edi
push dword [ebp - 0x2dc]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x10047731
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x10047714
push esi
push 0x10005f88
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x14
jmp 0x10047716
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2d8], eax
push 0x1008bdb8
lea eax, [ebp - 0x2d8]
push eax
call fcn.1006330f
push 0x60
pop edi
push edi
lea eax, [ebp - 0x2c8]
push ebx
push eax
call fcn.100620c0
push 0x11
lea eax, [ebp - 0x2c8]
push 0x10001a34
push eax
call fcn.10062770
movzx ax, byte [esi + 9]
and byte [ebp - 0x2b0], 0x3e
add esp, 0x18
mov word [ebp - 0x2b4], ax
xor eax, eax
push ebx
mov word [ebp - 0x2ae], ax
mov word [ebp - 0x2ac], ax
mov word [ebp - 0x2aa], ax
lea eax, [ebp - 0x2d4]
push eax
push edi
lea eax, [ebp - 0x2c8]
push eax
push dword [ebp - 0x2e8]
mov byte [ebp - 0x2b8], 1
mov byte [ebp - 0x2b7], bl
mov byte [ebp - 0x2b6], bl
mov byte [ebp - 0x2b2], 2
mov dword [ebp - 0x2a8], ebx
mov dword [ebp - 0x2a4], ebx
mov dword [ebp - 0x2a0], ebx
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x274], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1004780d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 1
cmp eax, ebx
je 0x10047714
push esi
push 0x10005f20
jmp 0x10047706
cmp dword [ebp - 0x2d4], edi
je 0x10047852
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 2
cmp eax, ebx
je 0x10047714
push edi
push dword [ebp - 0x2d4]
push 0x10005ea8
push ebx
push 0xa
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x10047716
movzx edx, byte [esi + 9]
cmp edx, ebx
mov dword [ebp - 0x2dc], ebx
mov dword [ebp - 0x2e0], ebx
jle 0x100479b0
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x314]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x2e0]
lea eax, [ecx + 1]
mov word [ebp - 0x30c], ax
mov eax, dword [ebp - 0x2dc]
add edx, 4
imul eax, eax, 0x50
imul edx, edx, 0x18
add edx, eax
movzx eax, byte [esi + 0xb]
cmp eax, ebx
mov byte [ebp - 0x309], 3
mov dword [ebp - 0x300], edx
jle 0x100478d4
lea edx, [ecx + 1]
lea edi, [esi + 0x11a0]
mov dword [ebp - 0x2d0], eax
movzx eax, byte [edi]
cmp eax, edx
jne 0x100478c9
inc byte [ebp - 0x30a]
add edi, 0xb
dec dword [ebp - 0x2d0]
jne 0x100478bc
movzx eax, byte [ebp - 0x30a]
movzx edx, byte [esi + 0xa]
add dword [ebp - 0x2dc], eax
cmp edx, ebx
mov byte [ebp - 0x2e1], bl
mov dword [ebp - 0x2d0], ebx
jle 0x10047968
inc ecx
mov dword [ebp - 0x2cc], ecx
mov eax, dword [ebp - 0x2d0]
imul eax, eax, 0x22
add eax, esi
movzx ecx, byte [eax + 0xe]
cmp ecx, dword [ebp - 0x2cc]
jne 0x1004795a
mov ecx, dword [eax + 0x16]
movzx di, byte [eax + 0xd]
inc ecx
mov dword [ebp - 0x310], ecx
mov word [ebp - 0x306], di
cmp byte [ebp - 0x2e1], bl
jne 0x1004795a
mov eax, dword [eax + 0xf]
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x2d0], ebx
jne 0x1004794c
mov dword [ebp - 0x314], 0xffffff6a
mov word [ebp - 0x308], di
mov byte [ebp - 0x2e1], 1
inc dword [ebp - 0x2d0]
cmp dword [ebp - 0x2d0], edx
jl 0x100478fc
push ebx
lea eax, [ebp - 0x2d4]
push eax
push 0x18
lea eax, [ebp - 0x314]
push eax
push dword [ebp - 0x2e8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047a1e
cmp dword [ebp - 0x2d4], 0x18
jne 0x10047a78
movzx edx, byte [esi + 9]
inc dword [ebp - 0x2e0]
cmp dword [ebp - 0x2e0], edx
jl 0x1004786a
mov dword [ebp - 0x2e0], ebx
mov dword [ebp - 0x2d0], ebx
cmp byte [esi + 0xb], bl
jbe 0x10047cf8
lea edi, [esi + 0x11a1]
mov dword [ebp - 0x2dc], edi
push 0x50
lea eax, [ebp - 0x268]
push ebx
push eax
call fcn.100620c0
mov al, byte [edi + 2]
add esp, 0xc
cmp al, bl
jbe 0x10047adf
cmp al, 0x64
jae 0x10047adf
movzx eax, al
dec eax
mov dword [ebp - 0x2d8], eax
imul eax, eax, 0x22
add eax, esi
cmp byte [eax + 0x22], 1
jne 0x10047ab5
mov al, byte [ebp - 0x268]
and al, 0xf9
or al, 1
jmp 0x10047ae7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 3
cmp eax, ebx
je 0x10047a5c
push esi
push dword [ebp - 0x2e0]
push 0x10005e38
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x18
jmp 0x10047a5e
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2cc], eax
push 0x1008bdb8
lea eax, [ebp - 0x2cc]
jmp 0x1004772b
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 4
cmp eax, ebx
je 0x10047a5c
push 0x18
push dword [ebp - 0x2d4]
push dword [ebp - 0x2e0]
push 0x10005db0
push ebx
push 0xa
push eax
call fcn.10037a50
add esp, 0x1c
jmp 0x10047a5e
cmp byte [eax + 0x24], 1
jne 0x10047ac7
mov al, byte [ebp - 0x268]
and al, 0xfa
or al, 2
jmp 0x10047ae7
cmp byte [eax + 0x25], 1
mov al, byte [ebp - 0x268]
jne 0x10047ad9
and al, 0xfc
or al, 4
jmp 0x10047ae7
and al, 0xfd
or al, 5
jmp 0x10047ae7
mov al, byte [ebp - 0x268]
and al, 0xf8
and al, 7
jne 0x10047afa
and byte [ebp - 0x267], 0x87
mov byte [ebp - 0x268], bl
jmp 0x10047b12
or al, 0xe8
mov byte [ebp - 0x268], al
mov al, byte [ebp - 0x267]
and al, 0x8f
or al, 8
mov byte [ebp - 0x267], al
mov al, byte [edi]
mov cl, byte [ebp - 0x266]
test al, 1
je 0x10047b23
or cl, 1
jmp 0x10047b26
and cl, 0xfe
test al, 2
je 0x10047b2f
or cl, 2
jmp 0x10047b32
and cl, 0xfd
test al, 4
je 0x10047b3b
or cl, 4
jmp 0x10047b3e
and cl, 0xfb
test al, 8
je 0x10047b47
or cl, 8
jmp 0x10047b4a
and cl, 0xf7
mov dl, al
xor dl, cl
and dl, 0xf
xor dl, al
test byte [ebp - 0x268], 7
mov al, byte [edi + 1]
mov byte [ebp - 0x265], al
mov al, byte [edi + 2]
mov byte [ebp - 0x264], al
mov al, byte [edi + 3]
mov byte [ebp - 0x263], al
mov al, byte [edi + 4]
mov byte [ebp - 0x262], al
mov al, byte [edi + 5]
mov byte [ebp - 0x261], al
mov al, byte [edi + 6]
mov byte [ebp - 0x260], al
mov al, byte [edi + 7]
mov byte [ebp - 0x25f], al
mov al, byte [edi + 8]
mov byte [ebp - 0x25e], al
mov al, byte [edi + 9]
mov byte [ebp - 0x266], dl
mov byte [ebp - 0x25d], al
jne 0x10047be5
xor eax, eax
mov dword [ebp - 0x25c], ebx
mov byte [ebp - 0x256], bl
mov word [ebp - 0x258], ax
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x23c], ebx
mov dword [ebp - 0x238], ebx
jmp 0x10047ca1
movzx edi, byte [esi + 0xb]
movzx ecx, byte [esi + 9]
add ecx, 4
mov eax, edi
imul ecx, ecx, 3
imul eax, eax, 0xa
add eax, ecx
add eax, dword [ebp - 0x2e0]
mov edx, 0x990
shl eax, 3
mov dword [ebp - 0x25c], eax
mov eax, edx
mov word [ebp - 0x258], ax
mov eax, dword [ebp - 0x2d8]
imul eax, eax, 0x22
add eax, esi
mov ebx, dword [eax + 0xf]
mov eax, dword [eax + 0x16]
mov dword [ebp - 0x2cc], ebx
sub eax, dword [ebp - 0x2cc]
mov dword [ebp - 0x244], ebx
mov ebx, dword [ebp - 0x2f0]
imul eax, eax, 0x990
add eax, edx
cdq
add dword [ebp - 0x2f0], eax
movzx eax, byte [esi + 0xa]
mov dword [ebp - 0x240], ebx
mov ebx, dword [ebp - 0x2ec]
adc dword [ebp - 0x2ec], edx
imul edi, edi, 5
add edi, dword [ebp - 0x2e0]
add eax, ecx
lea eax, [eax + edi*2]
mov edi, dword [ebp - 0x2dc]
shl eax, 3
inc dword [ebp - 0x2e0]
mov dword [ebp - 0x23c], ebx
mov byte [ebp - 0x256], 2
mov dword [ebp - 0x238], 1
mov dword [ebp - 0x234], eax
xor ebx, ebx
push ebx
lea eax, [ebp - 0x2d4]
push eax
push 0x50
lea eax, [ebp - 0x268]
push eax
push dword [ebp - 0x2e8]
mov dword [ebp - 0x230], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047ed3
cmp dword [ebp - 0x2d4], 0x50
jne 0x10047f17
movzx eax, byte [esi + 0xb]
inc dword [ebp - 0x2d0]
add edi, 0xb
cmp dword [ebp - 0x2d0], eax
mov dword [ebp - 0x2dc], edi
jl 0x100479d1
mov dword [ebp - 0x2d0], ebx
cmp byte [esi + 0xa], bl
jbe 0x10047d8e
xor eax, eax
lea edi, [ebp - 0x2f8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x2f8], ebx
cmp dword [ebp - 0x2d0], ebx
jne 0x10047d2d
mov eax, dword [esi + 0xf]
add eax, 0x96
mov dword [ebp - 0x2f8], eax
mov eax, dword [ebp - 0x2d0]
imul eax, eax, 0x22
add eax, esi
mov ecx, dword [eax + 0x16]
sub ecx, dword [eax + 0xf]
push ebx
lea eax, [ebp - 0x2d4]
push eax
push 8
pop edi
push edi
lea eax, [ebp - 0x2f8]
push eax
push dword [ebp - 0x2e8]
inc ecx
mov dword [ebp - 0x2f4], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047f4f
cmp dword [ebp - 0x2d4], edi
jne 0x10047f88
movzx eax, byte [esi + 0xa]
inc dword [ebp - 0x2d0]
cmp dword [ebp - 0x2d0], eax
jl 0x10047d07
mov dword [ebp - 0x2d0], ebx
cmp byte [esi + 0xa], bl
jbe 0x10047e31
lea eax, [esi + 0xf]
mov dword [ebp - 0x2dc], eax
movzx ecx, byte [esi + 0xa]
xor eax, eax
lea edi, [ebp - 0x324]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
movzx eax, byte [esi + 9]
lea eax, [eax + ecx + 4]
movzx ecx, byte [esi + 0xb]
imul eax, eax, 0x18
imul ecx, ecx, 0x50
add eax, ecx
mov dword [ebp - 0x324], eax
mov eax, dword [ebp - 0x2dc]
mov ecx, dword [eax + 7]
sub ecx, dword [eax]
push ebx
lea eax, [ebp - 0x2d4]
push eax
push 0x10
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 0x2e8]
inc ecx
mov dword [ebp - 0x31c], ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047fbb
cmp dword [ebp - 0x2d4], 0x10
jne 0x10047ff4
movzx eax, byte [esi + 0xa]
inc dword [ebp - 0x2d0]
add dword [ebp - 0x2dc], 0x22
cmp dword [ebp - 0x2d0], eax
jl 0x10047da6
push 0x104
lea eax, [ebp - 0x114]
push ebx
push eax
call fcn.100620c0
push dword [ebp - 0x2fc]
lea eax, [ebp - 0x114]
push 0x10005da8
push eax
call fcn.10062ada
lea eax, [ebp - 0x114]
add esp, 0x18
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10047e66
push ebx
sub eax, esi
lea ecx, [ebp - 0x2d4]
push ecx
inc eax
push eax
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x2e8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10048037
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 0xb
cmp eax, ebx
je 0x10047a5c
push esi
push 0x10005d48
push esi
push 5
push eax
call fcn.10037a50
add esp, 0x14
jmp 0x10047a5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2d8], eax
push 5
pop eax
mov dword [ebp - 4], eax
cmp dword [ebp - 0x2d8], ebx
je 0x10047a5c
push esi
push dword [ebp - 0x2d0]
push 0x10005cd8
push esi
push eax
push dword [ebp - 0x2d8]
jmp 0x10047a52
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 6
cmp eax, ebx
je 0x10047a5c
push 0x50
push dword [ebp - 0x2d4]
push dword [ebp - 0x2d0]
push 0x10005c58
jmp 0x10047aa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 7
cmp eax, ebx
je 0x10047a5c
push esi
push dword [ebp - 0x2d0]
push 0x10005bf0
jmp 0x10047a4e
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], edi
cmp eax, ebx
je 0x10047a5c
push edi
push dword [ebp - 0x2d4]
push dword [ebp - 0x2d0]
push 0x10005b78
jmp 0x10047aa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov esi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 9
cmp eax, ebx
je 0x10047a5c
push esi
push dword [ebp - 0x2d0]
push 0x10005b08
jmp 0x10047a4e
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2d8], eax
push 0xa
pop eax
mov dword [ebp - 4], eax
cmp dword [ebp - 0x2d8], ebx
je 0x10047a5c
push 0x10
push dword [ebp - 0x2d4]
push dword [ebp - 0x2d0]
push 0x10005a88
push ebx
push eax
push dword [ebp - 0x2d8]
jmp 0x10047aab
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10048040
sub eax, edx
inc eax
cmp dword [ebp - 0x2d4], eax
je 0x100480bc
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 4], 0xc
cmp eax, ebx
je 0x100480a0
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10048077
sub eax, edx
inc eax
push eax
push dword [ebp - 0x2d4]
push 0x10005a10
push ebx
push 0xa
push dword [ebp - 0x2cc]
call fcn.10037a50
add esp, 0x18
jmp 0x100480a2
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2dc], eax
push 0x1008bdb8
lea eax, [ebp - 0x2dc]
jmp 0x1004772b
push dword [ebp - 0x2e8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
call fcn.100630e9
ret 0xc