Function at 0x52e7a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push edi
mov edi, ecx
lea edx, [esp + 8]
and esp, 0xfffffff0
push dword [edx - 4]
push ebp
mov ebp, esp
push edx
push esi
push ebx
sub esp, 0x6c
mov esi, dword [edx]
mov ebx, dword [edx + 4]
cmp byte [ecx + 0x250], 0
mov dword [ebp - 0x2c], esi
mov eax, ebx
je 0x52e7f0
mov ecx, dword [ecx + 0x4b8]
cmp esi, ecx
jae 0x52e810
mov esi, dword [ebp - 0x2c]
mov ecx, esi
shr ecx, 0x18
cmp esi, 0xaffffff
ja 0x52ec80
jmp dword [ecx*4 + 0x6113b8]
mov ecx, esi
shr ecx, 0x18
cmp esi, 0xaffffff
ja 0x52e8c8
jmp dword [ecx*4 + 0x6113e4]
cmp dword [edi + 0x4bc], esi
jb 0x52e7d3
mov eax, dword [edi + 0x4c]
sub esi, ecx
and esi, 0x3fff
mov byte [eax + esi], bl
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret 8
mov esi, dword [ebp - 0x2c]
lea eax, [esi - 0x5000600]
cmp eax, 0x1ff
ja 0x52ed10
mov edi, dword [edi + 0x5e0]
mov ecx, esi
shr esi, 4
mov ebx, esi
shr ecx, 1
mov esi, 1
and ebx, 0x1c
add ebx, dword [edi + 0x3e4b0]
mov byte [edi + 0x3e4ac], 1
shl esi, cl
or dword [ebx], esi
jmp 0x52e826
cmp dword [ebp - 0x2c], 0xfffffff
jbe 0x5330d6
mov dword [esp + 8], 0x1e
mov dword [esp + 4], str.ARM7::Out_of_bounds_write_:_0x
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov ebx, dword [sym.imp.libstdc_6.dll_std::cout]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebx - 0xc]
mov esi, dword [ecx + sym.imp.libstdc_6.dll_VTT_for_std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___]
and esi, 0xffffffb5
or esi, 8
mov dword [ecx + sym.imp.libstdc_6.dll_VTT_for_std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___], esi
mov ecx, sym.imp.libstdc_6.dll_std::cout
mov dword [esp], edx
call sym.std::ostream_std::ostream::_M_insert_unsigned_long__unsigned_long_
sub esp, 4
mov ebx, eax
mov dword [esp + 8], 5
mov dword [esp + 4], 0x610bc0
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov edi, dword [edi + 0x5ec]
mov edi, dword [edi]
mov ecx, ebx
mov dword [esp], edi
call sym.std::ostream_std::ostream::_M_insert_unsigned_long__unsigned_long_
sub esp, 4
mov dword [esp + 8], 1
mov dword [esp + 4], 0x610bc6
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret 8
mov esi, dword [ebp - 0x2c]
lea ecx, [esi - 0x5000200]
cmp ecx, 0x1ff
ja 0x52fad6
mov edi, dword [edi + 0x5e0]
mov ecx, esi
shr esi, 4
mov eax, 1
mov ebx, esi
shr ecx, 1
and ebx, 0x1c
add ebx, dword [edi + 0x3e498]
mov byte [edi + 0x3e494], 1
shl eax, cl
or dword [ebx], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret 8
mov eax, dword [edi + 0x10]
mov esi, dword [ebp - 0x2c]
mov byte [eax + esi], bl
lea esi, [esi]
nop
mov ebx, dword [ebp - 0x2c]
lea edx, [ebx - 0x5000000]
cmp edx, 0x1ff
ja 0x52ea38
mov edx, dword [edi + 0x5e0]
mov ecx, ebx
shr ebx, 4
mov esi, 1
shr ecx, 1
and ebx, 0x1c
add ebx, dword [edx + 0x3e468]
mov byte [edx + 0x3e465], 1
shl esi, cl
or dword [ebx], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret 8
cmp dword [ebp - 0x2c], 0xfffffff
jbe 0x5330d6
mov dword [esp + 8], 0x1e
mov dword [esp + 4], str.ARM9::Out_of_bounds_write_:_0x
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov esi, dword [sym.imp.libstdc_6.dll_std::cout]
mov ebx, dword [ebp - 0x2c]
mov edx, dword [esi - 0xc]
mov ecx, dword [edx + sym.imp.libstdc_6.dll_VTT_for_std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___]
and ecx, 0xffffffb5
or ecx, 8
mov dword [edx + sym.imp.libstdc_6.dll_VTT_for_std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___], ecx
mov ecx, sym.imp.libstdc_6.dll_std::cout
mov dword [esp], ebx
call sym.std::ostream_std::ostream::_M_insert_unsigned_long__unsigned_long_
sub esp, 4
mov ebx, eax
mov dword [esp + 8], 5
mov dword [esp + 4], 0x610bc0
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::__ostream_insert_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const__int_
mov edi, dword [edi + 0x5f0]
jmp 0x52e93f
mov edx, dword [edi + 0x4cc]
mov ebx, dword [ebp - 0x2c]
cmp ebx, edx
jb 0x5329b0
add edx, 0x4000
cmp ebx, edx
jae 0x5329b0
mov edi, dword [edi + 0x5e0]
mov ecx, ebx
shr ebx, 4
mov edx, 1
shr ecx, 1
and ebx, 0x3fc
add ebx, dword [edi + 0x3e4c8]
mov byte [edi + 0x3e4c4], 1
shl edx, cl
or dword [ebx], edx
jmp 0x52e826
mov ebx, dword [ebp - 0x2c]
lea ecx, [ebx - 0x5000400]
cmp ecx, 0x1ff
ja 0x52e880
mov edx, dword [edi + 0x5e0]
mov ecx, ebx
shr ebx, 4
mov eax, 1
shr ecx, 1
and ebx, 0x1c
add ebx, dword [edx + 0x3e480]
mov byte [edx + 0x3e47c], 1
shl eax, cl
or dword [ebx], eax
jmp 0x52e826
mov ecx, dword [edi + 0x4d4]
mov esi, dword [ebp - 0x2c]
cmp esi, ecx
jb 0x532a00
add ecx, 0x4000
cmp esi, ecx
jae 0x532a00
shr esi, 1
mov ebx, dword [edi + 0x5e0]
mov eax, 1
mov edx, esi
mov ecx, esi
and edx, 0x1fff
mov esi, dword [ebx + 0x3e4c8]
mov byte [ebx + 0x3e4c4], 1
shl eax, cl
add edx, 0x2000
sar edx, 5
or dword [esi + edx*4], eax
jmp 0x52e826
mov eax, dword [edi + 0x4ec]
mov ebx, dword [ebp - 0x2c]
cmp ebx, eax
jb 0x532a48
add eax, 0x8000
cmp ebx, eax
jae 0x532a48
mov edx, dword [edi + 0x5e0]
mov ecx, ebx
shr ebx, 4
mov edi, 1
shr ecx, 1
and ebx, 0x7fc
add ebx, dword [edx + 0x3e4e0]
mov byte [edx + 0x3e4dc], 1
shl edi, cl
or dword [ebx], edi
jmp 0x52e826
mov esi, dword [ebp - 0x2c]
lea edx, [esi - 0x6880000]
cmp edx, 0x11fff
ja 0x532b1b
mov edx, dword [edi + 0x5e0]
cmp byte [edx + 0x69], 0
jne 0x532ba8
cmp byte [edi + 0x250], 0
je 0x52e826
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [edi + 0x10]
mov edi, dword [edi + 0x5e4]
mov esi, ebx
shr ebx, 1
and esi, 0xfffffffe
and ebx, 0x1f
movzx eax, byte [ecx + esi + 1]
movzx edx, byte [ecx + esi]
shl eax, 8
or edx, eax
shr eax, 7
mov esi, edx
shr dx, 5
and eax, 0xf8
shl esi, 0x13
shl edx, 0xb
and esi, 0xff0000
and edx, 0xf800
or eax, esi
or eax, edx
or eax, 0xff000000
mov dword [edi + ebx*4 + 0x215c], eax
jmp 0x52e826
mov eax, dword [edi + 0x10]
mov edx, dword [ebp - 0x2c]
mov byte [eax + edx], bl
jmp 0x52fad6
lea ecx, [esi - 0x6894000]
cmp ecx, 0x1fff
jbe 0x532b98
lea eax, [esi - 0x68a0000]
cmp eax, 0x1fff
jbe 0x532fa8
lea ebx, [esi - 0x7000000]
cmp ebx, 0x7ff
ja 0x534acc
mov edi, dword [edi + 0x5e0]
mov ecx, esi
shr esi, 6
mov edx, 1
mov ebx, esi
shr ecx, 3
and ebx, 0x1c
add ebx, dword [edi + 0x3e528]
mov byte [edi + 0x3e526], 1
shl edx, cl
or dword [ebx], edx
jmp 0x52e826
mov edx, dword [edi + 0x5e0]
cmp byte [edx + 0x6a], 0
je 0x532a6d
mov ecx, esi
shr esi, 4
mov eax, 1
mov byte [edx + 0x3e4f4], 1
mov ebx, esi
shr ecx, 1
and ebx, 0x1fc
add ebx, dword [edx + 0x3e4f8]
shl eax, cl
or dword [ebx], eax
jmp 0x52e826
mov edi, dword [edi + 0x5e0]
mov ecx, esi
shr esi, 4
mov eax, 1
mov ebx, esi
shr ecx, 1
and ebx, 0x1fc
add ebx, dword [edi + 0x3e510]
mov byte [edi + 0x3e50c], 1
shl eax, cl
or dword [ebx], eax
jmp 0x52e826
cmp dword [ebp - 0x2c], 0x4000603
jbe 0x532b0d
jmp 0x52ea8f
mov esi, dword [ebp - 0x2c]
sub esi, 0x4000380
cmp esi, 0x3c00003f
ja 0x52e826
jmp 0x532a6d